﻿namespace MovieTicket.WebApi.Controllers
{
    using System.Collections.Generic;
    using System.Web.Http;

    using MovieTicket.WebApi.BBL;
    using MovieTicket.WebApi.BBL.BusinessObjects;

    /// <summary>
    /// Class MoviesController
    /// </summary>
    public class MoviesController : ApiController
    {
        #region Public Methods and Operators

        /// <summary>
        /// Deletes the specified id.
        /// </summary>
        /// <param name="id">The id.</param>
        public void Delete(int id)
        {
        }

        /// <summary>
        /// Gets the specified id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <returns>List{MovieBO}.</returns>
        [Authorize]
        public List<MovieBO> Get(string id)
        {
            return MovieTicketsBLL.GetMovies(id);
        }

        /// <summary>
        /// Gets this instance.
        /// </summary>
        /// <returns>List{MovieBO}.</returns>
        [Authorize]
        public List<MovieBO> Get()
        {
            return MovieTicketsBLL.GetMovies(string.Empty);
        }

        /// <summary>
        /// Gets the movie list.
        /// </summary>
        /// <param name="listType">Type of the list.</param>
        /// <returns>List{MovieBO}.</returns>
        public List<MovieBO> GetMovieList(int listType)
        {
            return MovieTicketsBLL.GetMovieList(listType);
        }

        /// <summary>
        /// Gets the trailers.
        /// </summary>
        /// <returns>List{TrailerBO}.</returns>
        public List<TrailerBO> GetTrailers()
        {
            return MovieTicketsBLL.GetTrailers();
        }

        /// <summary>
        /// Posts the specified value.
        /// </summary>
        /// <param name="value">The value.</param>
        public void Post([FromBody] string value)
        {
        }

        /// <summary>
        /// Puts the specified id.
        /// </summary>
        /// <param name="id">The id.</param>
        /// <param name="value">The value.</param>
        public void Put(int id, [FromBody] string value)
        {
        }

        #endregion
    }
}